home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
texts
/
hsc.lha
/
hsc
/
src_docs
/
features
/
strftime.txt
< prev
next >
Wrap
Text File
|
1996-01-14
|
4KB
|
133 lines
STRFTIME(3) UNIX Programmer's Manual STRFTIME(3)
NAAMMEE
ssttrrffttiimmee - format date and time
SSYYNOOPPSSIISS
##iincclluuddee <<ssyyss//ttyyppeess..hh>>
##iincclluuddee <<ttiimmee..hh>>
##iincclluuddee <<ssttrriingg..hh>>
size_t
ssttrrffttiimmee(char *buf, size_t maxsize, const char *format,
const struct tm *timeptr)
DDEESSCCRRIIPPTTIIOON
The ssttrrffttiimmee() function formats the information from timeptr into the
buffer buf according to the string pointed to by format.
The format string consists of zero or more conversion specifications and
ordinary characters. All ordinary characters are copied directly into
the buffer. A conversion specification consists of a percent sign
```%''' and one other character.
No more than maxsize characters will be placed into the array. If the
total number of resulting characters, including the terminating null
character, is not more than maxsize, ssttrrffttiimmee() returns the number of
characters in the array, not counting the terminating null. Otherwise,
zero is returned.
Each conversion specification is replaced by the characters as follows
which are then copied into the buffer.
%%AA is replaced by the full weekday name.
%%aa is replaced by the abbreviated weekday name, where the abbreviation
is the first three characters.
%%BB is replaced by the full month name.
%%bb oorr %%hh
is replaced by the abbreviated month name, where the abbreviation
is the first three characters.
%%CC is equivalent to ``%a %b %e %H:%M:%S %Y'' (the format produced by
asctime(3).
%%cc is equivalent to ``%m/%d/%y''.
%%DD is replaced by the date in the format ```mm/dd/yy'''.
%%dd is replaced by the day of the month as a decimal number (0131).
%%ee is replaced by the day of month as a decimal number (131); single
digits are preceded by a blank.
%%HH is replaced by the hour (24hour clock) as a decimal number
(0023).
%%II is replaced by the hour (12hour clock) as a decimal number
(0112).
%%jj is replaced by the day of the year as a decimal number (001366).
%%kk is replaced by the hour (24hour clock) as a decimal number (023);
single digits are preceded by a blank.
%%ll is replaced by the hour (12hour clock) as a decimal number (112);
single digits are preceded by a blank.
%%MM is replaced by the minute as a decimal number (0059).
%%mm is replaced by the month as a decimal number (0112).
%%n is replaced by a newline.
%%pp is replaced by either ``AM'' or ``PM'' as appropriate.
%%RR is equivalent to ``%H:%M''
%%rr is equivalent to ``%I:%M:%S %p''.
%%tt is replaced by a tab.
%%SS is replaced by the second as a decimal number (0060).
%%ss is replaced by the number of seconds since the Epoch, UCT (see
mktime(3)).
%%TT or %%XX
is equivalent to ``%H:%M:%S''.
%%UU is replaced by the week number of the year (Sunday as the first day
of the week) as a decimal number (0053).
%%WW is replaced by the week number of the year (Monday as the first day
of the week) as a decimal number (0053).
%%ww is replaced by the weekday (Sunday as the first day of the week) as
a decimal number (06).
%%xx is equivalent to ``%m/%d/%y %H:%M:%S''.
%%YY is replaced by the year with century as a decimal number.
%%yy is replaced by the year without century as a decimal number
(0099).
%%ZZ is replaced by the time zone name.
%%%% is replaced by `%'.
SSEEEE AALLSSOO
date(1), ctime(3), printf(1), printf(3)
SSTTAANDDAARRDDSS
The ssttrrffttiimmee() function conforms to ANSI C3.1591989 (``ANSI C''). The
`%s' conversion specification is an extension.
BBUUGGSS
There is no conversion specification for the phase of the moon.
BSD Experimental June 29, 1991 2